package cn.wolfcode.p2p.business.service;

import cn.wolfcode.p2p.base.qo.QueryObject;
import cn.wolfcode.p2p.business.domain.PaymentSchedule;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface IPaymentScheduleService {
    int save(PaymentSchedule paymentSchedule);
    int update(PaymentSchedule paymentSchedule);

    PaymentSchedule get(Long id);

    PageInfo queryPage(QueryObject qo);

    /**
     * 还款
     * @param id
     */
    void returnMoney(Long id);

    /**
     * 根据借款对象Id查询该借款对象下的所有还款对象
     * @param bidRequestId
     * @return
     */
    List<PaymentSchedule> queryByBidRequestId(Long bidRequestId);

    /**
     * 查询前一天还款逾期的集合
     * @return
     */
    List<PaymentSchedule> queryYesterdayOverduePaymentScheduleList();
}
